package com.xuelang.pipeline.infrastructure.task.mapper;

import com.github.yulichang.base.MPJBaseMapper;
import com.xuelang.pipeline.infrastructure.task.dataobject.TaskDO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * 流水线任务数据Mapper
 *
 * @author xiwen.zxg
 * @since 2024/5/15
 */
@Repository
public interface TaskMapper extends MPJBaseMapper<TaskDO> {

    /**
     * 通过流水线模板uuid，批量插入流水线任务
     *
     * @param pipelineTemplateUuid
     * @param toPipelineCode
     * @param userId
     * @return
     */
    int batchInsertByPipelineTemplateUuid(
            @Param("pipelineTemplateUuid") String pipelineTemplateUuid,
            @Param("toPipelineCode") String toPipelineCode,
            @Param("userId") String userId);

}
